package day15.并发工具类CountDownLatch;

import java.util.concurrent.CountDownLatch;

public class ChileThread1 extends Thread{
    private CountDownLatch countDownLatch;
    public ChileThread1(CountDownLatch countDownLatch){
        this.countDownLatch=countDownLatch;
    }

    @Override
    public void run() {
        for (int i = 1; i <= 10; i++) {
            System.out.println(getName()+"在吃第"+i+"个饺子");
        }
        countDownLatch.countDown();
    }
}
